﻿using Infrastructure.Core.Web.Controller;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;

namespace IdentityService.WebAPI.Controllers
{
    [ApiController]
    [Route("api/[controller]/[action]")]
    public class TestController : BaseController
    {
        private readonly IMemoryCache _cache;
        public TestController(IMemoryCache cache)
        {
            _cache = cache;
        }

        [HttpGet]
        public ActionResult<MemoryCacheStatistics> Test()
        {
            return Ok(_cache.GetCurrentStatistics());
        }
    }
}
